package designpattern.template.lock;

public class ZookeeperLockTemplate extends AbstractLockTemplate{
    @Override
    protected void lock(String key, float releaseTime) {
        if (key != null) zookeeperLock(key,releaseTime);
    }

    @Override
    protected void unLock() {
        zookeeperUnLock();
    }

    private void zookeeperLock(String key, float releaseTime){
        System.out.println("zookeeper加锁");
    }

    private void zookeeperUnLock(){
        System.out.println("zookeeper解锁");
    }
}
